"""
用户信息表
"""
from datetime import datetime
from common.models import db


class Video(db.Model):
    """
    视频表
    """
    __tablename__ = 'video'

    id = db.Column(db.Integer, primary_key=True, doc='视频id')
    user = db.Column(db.Integer, db.ForeignKey("user.id", ondelete="CASCADE"), doc='上传者')
    upload_path = db.Column(db.String(256), doc='上传路径')


class Image(db.Model):
    """
    图片表
    """
    __tablename__ = 'image'

    id = db.Column(db.Integer, primary_key=True, doc='视频id')
    user = db.Column(db.Integer, db.ForeignKey("user.id", ondelete="CASCADE"), doc='上传者')
    upload_path = db.Column(db.String(256), doc='上传路径')

